export default defineConfig({
  routes: [
    {
      path: '/user',
      layout: false,
      routes: [
        {
          path: '/user/login',
          layout: false,
          name: 'login',
          component: './user/Login',
        },
        {
          path: '/user',
          redirect: '/user/login',
        },
        {
          name: 'register-result',
          icon: 'smile',
          path: '/user/register-result',
          component: './user/register-result',
        },
        {
          name: 'register',
          icon: 'smile',
          path: '/user/register',
          component: './user/register',
        },
        {
          component: '404',
        },
      ],
    },
    {
      path: '/welcome',
      name: 'welcome',
      icon: 'smile',
      component: './Welcome',
    },
    {
      path: '/doctor',
      name: 'doctor',
      icon: 'profile',
      routes: [
        {
          path: '/doctor',
          redirect: '/doctor/doctor-list',
        },
        {
          name: 'list',
          icon: 'smile',
          path: '/doctor/doctor-list',
          component: './doctor/index',
        },
        {
          name: 'detail',
          icon: 'smile',
          hideInMenu: true,
          path: '/doctor/doctor-detail',
          component: './doctor/detail',
        },
        {
          name: 'authlist',
          icon: 'smile',
          path: '/doctor/auth-list',
          component: './doctor/authList',
        },
        {
          name: 'authdetail',
          icon: 'smile',
          hideInMenu: true,
          path: '/doctor/auth-detail',
          component: './doctor/auth-detail',
        },
      ],
    },
    {
      path: '/hospital',
      icon: 'profile',
      name: 'hospital',
      routes: [
        {
          path: '/hospital',
          redirect: '/hospital/hospital-list',
        },
        {
          name: 'list',
          icon: 'smile',
          path: '/hospital/hospital-list',
          component: './hospital/index',
        },
        {
          name: 'authlist',
          icon: 'smile',
          path: '/hospital/authList',
          component: './hospital/authList',
        },
        {
          name: 'detail',
          icon: 'smile',
          hideInMenu: true,
          path: '/hospital/hospital-detail',
          parentKeys: ['/hospital/hospital-list'],
          component: './hospital/detail',
        },
        {
          name: 'hospitalDeptList',
          icon: 'smile',
          path: '/hospital/hospitalDept-list',
          component: './hospitalDept/index',
        },
        {
          name: 'hospitalDeptDetail',
          icon: 'smile',
          hideInMenu: true,
          path: '/hospital/hospitalDept-detail',
          component: './hospitalDept/detail',
          parentKeys: ['/hospital/hospitalDept-list'],
        },
        {
          name: 'hospitalNoticeList',
          icon: 'smile',
          path: '/hospital/hospitalNotice-list',
          component: './hospitalNotice/index',
        },
        {
          name: 'hospitalNoticeDetail',
          icon: 'smile',
          hideInMenu: true,
          path: '/hospital/hospitalNotice-detail',
          component: './hospitalNotice/detail',
          parentKeys: ['/hospital/hospitalNotice-list'],
        },
      ],
    },
    {
      path: '/disease',
      name: 'disease',
      icon: 'profile',
      routes: [
        {
          path: '/disease',
          redirect: '/disease/disease-list',
        },
        {
          name: 'list',
          icon: 'smile',
          path: '/disease/disease-list',
          component: './disease/index',
        },
        {
          name: 'detail',
          icon: 'smile',
          hideInMenu: true,
          path: '/disease/disease-detail',
          component: './disease/detail',
          parentKeys: ['/disease/disease-list'],
        },
      ],
    },
    {
      path: '/case',
      name: 'case',
      icon: 'profile',
      routes: [
        {
          path: '/case',
          redirect: '/case/case-list',
        },
        {
          name: 'list',
          icon: 'smile',
          path: '/case/case-list',
          component: './case/index',
        },
        {
          name: 'detail',
          icon: 'smile',
          hideInMenu: true,
          path: '/case/case-detail',
          component: './case/detail',
          parentKeys: ['/case/case-list'],
        },
        {
          name: 'recordDetail',
          icon: 'smile',
          hideInMenu: true,
          path: '/case/record-detail',
          component: './case/record-detail',
          parentKeys: ['/case/case-list'],
        },
        {
          name: 'records',
          icon: 'smile',
          path: '/case/records-list',
          component: './caseRecords/index',
        },
        {
          name: 'recordsDetail',
          icon: 'smile',
          hideInMenu: true,
          path: '/case/records-detail',
          component: './case/record-detail',
          parentKeys: ['/case/records-list'],
        },
        {
          name: 'caselist',
          icon: 'smile',
          path: '/case/case-new-list',
          component: './case/list',
        },
        {
          name: 'caseDetail',
          icon: 'smile',
          hideInMenu: true,
          path: '/case/case-detail-new',
          component: './case/case-detail-new',
          parentKeys: ['/case/records-list', '/case/case-new-list'],
        },
      ],
    },
    {
      path: '/experience',
      name: 'experience',
      icon: 'profile',
      routes: [
        {
          path: '/experience',
          redirect: '/experience/experience-list',
        },
        {
          name: 'list',
          icon: 'smile',
          path: '/experience/experience-list',
          component: './experience/index',
        },
        {
          name: 'detail',
          icon: 'smile',
          hideInMenu: true,
          path: '/experience/experience-detail',
          component: './experience/detail',
          parentKeys: ['/experience/experience-list'],
        },
      ],
    },
    {
      path: '/qaa',
      name: 'qaa',
      icon: 'profile',
      routes: [
        {
          path: '/qaa',
          redirect: '/qaa/qaa-list',
        },
        {
          name: 'list',
          icon: 'smile',
          path: '/qaa/qaa-list',
          component: './qaa/index',
        },
        {
          name: 'detail',
          icon: 'smile',
          hideInMenu: true,
          path: '/qaa/qaa-detail',
          component: './qaa/detail',
          parentKeys: ['/qaa/qaa-list'],
        },
      ],
    },
    {
      path: '/article',
      name: 'article',
      icon: 'profile',
      routes: [
        {
          path: '/article',
          redirect: '/article/article-list',
        },
        {
          name: 'list',
          icon: 'smile',
          path: '/article/article-list',
          component: './article/index',
        },
        {
          name: 'detail',
          icon: 'smile',
          hideInMenu: true,
          path: '/article/article-detail',
          component: './article/detail',
          parentKeys: ['/article/article-list'],
        },
      ],
    },
    {
      path: '/activity',
      name: 'activity',
      icon: 'profile',
      routes: [
        {
          path: '/activity',
          redirect: '/activity/activity-list',
        },
        {
          name: 'list',
          icon: 'smile',
          path: '/activity/activity-list',
          component: './activity/index',
        },
        {
          name: 'detail',
          icon: 'smile',
          hideInMenu: true,
          path: '/activity/activity-detail',
          component: './activity/detail',
          parentKeys: ['/activity/activity-list'],
        },
      ],
    },
    {
      path: '/dict',
      name: 'dict',
      icon: 'profile',
      component: './dict',
    },
    {
      path: '/subscriber',
      name: 'subscriber',
      icon: 'profile',
      routes: [
        {
          path: '/subscriber',
          redirect: '/subscriber/subscriber-list',
        },
        {
          name: 'list',
          icon: 'smile',
          path: '/subscriber/subscriber-list',
          component: './subscriber/index',
        },
        {
          name: 'detail',
          icon: 'smile',
          hideInMenu: true,
          path: '/subscriber/subscriber-detail',
          component: './subscriber/detail',
          parentKeys: ['/subscriber/subscriber-list'],
        },
        {
          name: 'userVisitor',
          hideInMenu: true,
          path: '/subscriber/userVisitor',
          component: './subscriber/userVisitor',
          parentKeys: ['/subscriber/subscriber-list'],
        },
      ],
    },
    {
      name: 'result',
      icon: 'CheckCircleOutlined',
      path: '/result',
      hideInMenu: true,
      routes: [
        {
          path: '/result',
          redirect: '/result/success',
        },
        {
          name: 'success',
          icon: 'smile',
          path: '/result/success',
          component: './result/success',
        },
        {
          name: 'fail',
          icon: 'smile',
          path: '/result/fail',
          component: './result/fail',
        },
      ],
    },
    {
      name: 'exception',
      icon: 'warning',
      hideInMenu: true,
      path: '/exception',
      routes: [
        {
          path: '/exception',
          redirect: '/exception/403',
        },
        {
          name: '403',
          icon: 'smile',
          path: '/exception/403',
          component: './exception/403',
        },
        {
          name: '404',
          icon: 'smile',
          path: '/exception/404',
          component: './exception/404',
        },
        {
          name: '500',
          icon: 'smile',
          path: '/exception/500',
          component: './exception/500',
        },
      ],
    },
    {
      name: 'account',
      icon: 'user',
      hideInMenu: true,
      path: '/account',
      routes: [
        {
          path: '/account',
          redirect: '/account/center',
        },
        {
          name: 'center',
          icon: 'smile',
          path: '/account/center',
          component: './account/center',
        },
        {
          name: 'settings',
          icon: 'smile',
          path: '/account/settings',
          component: './account/settings',
        },
      ],
    },
    {
      name: 'editor',
      icon: 'highlight',
      hideInMenu: true,
      path: '/editor',
      routes: [
        {
          path: '/editor',
          redirect: '/editor/flow',
        },
        {
          name: 'flow',
          icon: 'smile',
          path: '/editor/flow',
          component: './editor/flow',
        },
        {
          name: 'mind',
          icon: 'smile',
          path: '/editor/mind',
          component: './editor/mind',
        },
        {
          name: 'koni',
          icon: 'smile',
          path: '/editor/koni',
          component: './editor/koni',
        },
      ],
    },
    {
      path: '/',
      redirect: '/welcome',
    },
    {
      component: '404',
    },
  ]
})